package com.myblog.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.myblog.models.Blog;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface BlogMapper extends BaseMapper<Blog> {

    @Select("SELECT blog_id, blog_title, blog_content, create_timestamp, update_timestamp FROM blog_detail_t order by create_timestamp desc limit 0, 1")
    public Blog selectOneLatest();

}
